// 会员充值
<template>
    <div>
        <GoBack :location='jumptext'></GoBack>
        <div class="RechargeBox" v-if="!isSuccess">
            <div class="RechargeTitle flex ">
                <div class="RechargeTitleTab tabright">
                    <p>会员充值</p>
                </div>
                <div class="RechargeTitleTab tableft" @click="AgentRechargeFun">
                    <p>代理充值</p>
                </div>
            </div>
        <!-- 用户信息 -->
        <UserInfoBox></UserInfoBox>
        <!-- 选择套餐 -->
        <MemberPayTabs v-on:setorder='onSetOrder' ></MemberPayTabs>
        <!-- 支付下单模块 -->
        <PayBtnBox :orderInfo='orderInfo' v-on:succ='onsuccess'></PayBtnBox>
        </div>
        <RechargeSuccess v-if="isSuccess" :data='successData'></RechargeSuccess>
    </div>
</template>
<script>
import GoBack from '../goback'
import UserInfoBox from './assembly/userInfo'
import MemberPayTabs from './assembly/memberPayTabs'
import PayBtnBox from './assembly/payBtnBox'
import RechargeSuccess from './assembly/RechargeSuccess'
export default {
    components: {
        GoBack,
        UserInfoBox,
        MemberPayTabs,
        PayBtnBox,
        RechargeSuccess
    },
    data () {
        return {
            orderInfo:{},
            isSuccess:false,
            successData:{},
            url:'',
            jumptext:'/usercenter'
        }
    },
    mounted () {
    },
    methods: {
       AgentRechargeFun(){
            this.$router.push('/AgentRecharge')
       },
       onSetOrder(ele){
          this.orderInfo = ele;
       },
       onsuccess(data){
           this.successData = data;
           this.isSuccess = true;
       }
    }
}
</script>
<style lang="less" scoped>
@import url(../../assets/css/usercenter/membershiprecharge.less);
</style>


